package cn.hd01.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import cn.hd01.repository.AreasRepository;
import cn.hd01.repository.entity.Areas;
import cn.hd01.service.AreasService;

@Service
public class AreasServiceImpl extends BaseServiceImpl<Areas, Integer> implements AreasService {

	private AreasRepository repository;

	@Autowired
	public AreasServiceImpl(AreasRepository repository) {
		super(repository);
		this.repository = repository;
	}

	@Override
	@Cacheable(value="areasCache")
	public List<Areas> findByCityId(Integer cityId) {
		return repository.findByCityId(cityId);
	}

}
